home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1992-1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- //////////////////////////////////////////////////////////////////////
- // Simulation.h - definition of the simulation class
- //////////////////////////////////////////////////////////////////////
-
- #ifndef SIMULATION_H
- #define SIMULATION_H
-
- #include <Inventor/SbPList.h>
- #include <Inventor/SbString.h>
- #include "Defines.h"
- #include "Car.h"
- #include "Driver.h"
-
- class Car;
- class Road;
- class SbPList;
- class Network;
-
- class Simulation {
-
- public:
-
- Simulation(
- SbString roadfile, SbString carfile, SbString path,
- int num_robots, Boolean quiet, Boolean race);
- ~Simulation();
-
- void go();
-
- const SbPList * get_car_list() const { return _car_list; };
-
- float get_fps() const { return _fps; };
-
- // returns TRUE if the simulation should be making noise
- Boolean play_sound() const { return _play_sound; };
-
- // returns TRUE if the hardware is capable of sound
- Boolean sound_capable() const { return _sound_capable; };
-
- // toggles the sound and returns the result.
- Boolean toggle_sound()
- {_play_sound = _sound_capable && (!_play_sound); return _play_sound; };
-
- SbString get_path() const { return _path; };
-
- protected:
-
- SbPList * _car_list; // list of cars, first is the local car
-
- Road * _road; // the roadway used by the current simulation
-
- Network * _network; // network communication for racing
-
- float _fps; // frames per second for the local driver
-
- Boolean _sound_capable; // TRUE if this machine can support sound
- Boolean _play_sound; // TRUE if simulation should make noise
-
- SbString _path; // path to the data files, including a trailing "/"
- };
-
- #endif
-
-